package com.example.controller;

import com.example.common.exception.JwtAuthenticationException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author 王鹤蒲
 * @Date 2023 10 25
 */

@RestController
public class JwtAuthenticationExceptionController {

    @RequestMapping("/throwJwtAuthenticatonException")
    public void jwtAuthenticatonException(HttpServletRequest request){
       throw (JwtAuthenticationException)request.getAttribute("JwtAuthenticationException");
    }
}
